home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / fontutil.6 / fontutil / fontutils-0.6 / include / bb-list.h next >
Encoding:
C/C++ Source or Header  |  1992-10-04  |  1.5 KB  |  54 lines

  1. /* bb-list.h: bounding box lists.
  2.  
  3. Copyright (C) 1992 Free Software Foundation, Inc.
  4.  
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9.  
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. GNU General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. #ifndef BB_LIST_H
  20. #define BB_LIST_H
  21.  
  22. #include "bounding-box.h"
  23.  
  24.  
  25. typedef struct
  26. {
  27.   bounding_box_type *data;
  28.   unsigned length;
  29. } bb_list_type;
  30.  
  31. /* The length of the list.  */
  32. #define BB_LIST_LENGTH(bb_l) ((bb_l).length)
  33.  
  34. /* The array of elements as a whole.  */
  35. #define BB_LIST_DATA(bb_l) ((bb_l).data)
  36.  
  37. /* The Nth element in the list.  */
  38. #define BB_LIST_ELT(bb_l, n) BB_LIST_DATA (bb_l)[n]
  39.  
  40.  
  41. /* Initialize a list.  */
  42. extern bb_list_type bb_list_init (void);
  43.  
  44. /* Append BB to L.  */
  45. extern void bb_list_append (bb_list_type *l, bounding_box_type bb);
  46.  
  47. /* Splice the elements in list B2 onto B1, changing B1.  */
  48. extern void bb_list_splice (bb_list_type *B1, bb_list_type B2);
  49.  
  50. /* Free the memory in a list.  */
  51. extern void bb_list_free (bb_list_type *);
  52.  
  53. #endif /* not BB_LIST_H */
  54.